package com.anda.logistics.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Transient;

import com.anda.logistics.map.util.CommUtil;

@Entity
public class FreightSource {
	private long id;
	private String freightName;
	private String originProvince;
	private String originCity;
	private String originRegion;
	private String destProvince;
	private String destCity;
	private String destRegion;
	private String freightType;
	private String packType;
	private Float freightWeight;
	private Float freightVolumn;
	private String attention;
	private Date makeTime;
	private Date modifyTime;
	private int freightState;
	private long deliverUserId;
	private Date deliverTime;
	private long receiveUserId;
	private Date receiveTime;
	private long auditUserId;
	private String auditUserName;
	private Date auditTime;
	private long createUserId;
	private String createUserName;
	
	public int getFreightState() {
		return freightState;
	}
	public void setFreightState(int freightState) {
		this.freightState = freightState;
	}
	public FreightSource(long id) {
		this.id = id;
	}
	public FreightSource(){}
	@Id
	@GeneratedValue
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	@Column(length=100)
	public String getFreightName() {
		return freightName;
	}
	public void setFreightName(String freightName) {
		this.freightName = freightName;
	}
	@Column(length=10)
	public String getOriginProvince() {
		return originProvince;
	}
	public void setOriginProvince(String originProvince) {
		this.originProvince = originProvince;
	}
	@Column(length=10)
	public String getOriginCity() {
		return originCity;
	}
	public void setOriginCity(String originCity) {
		this.originCity = originCity;
	}
	@Column(length=10)
	public String getOriginRegion() {
		return originRegion;
	}
	public void setOriginRegion(String originRegion) {
		this.originRegion = originRegion;
	}
	@Column(length=10)
	public String getDestProvince() {
		return destProvince;
	}
	public void setDestProvince(String destProvince) {
		this.destProvince = destProvince;
	}
	@Column(length=10)
	public String getDestCity() {
		return destCity;
	}
	public void setDestCity(String destCity) {
		this.destCity = destCity;
	}
	@Column(length=10)
	public String getDestRegion() {
		return destRegion;
	}
	public void setDestRegion(String destRegion) {
		this.destRegion = destRegion;
	}
	@Column(columnDefinition="CHAR(2)")
	public String getFreightType() {
		return freightType;
	}
	public void setFreightType(String freightType) {
		this.freightType = freightType;
	}
	@Column(columnDefinition="CHAR(2)")
	public String getPackType() {
		return packType;
	}
	public void setPackType(String packType) {
		this.packType = packType;
	}
	@Column(columnDefinition="DECIMAL(8,4)")
	public Float getFreightWeight() {
		return freightWeight;
	}
	public void setFreightWeight(Float freightWeight) {
		this.freightWeight = freightWeight;
	}
	@Column(columnDefinition="DECIMAL(8,4)")
	public Float getFreightVolumn() {
		return freightVolumn;
	}
	public void setFreightVolumn(Float freightVolumn) {
		this.freightVolumn = freightVolumn;
	}
	@Column(length=512)
	public String getAttention() {
		return attention;
	}
	public void setAttention(String attention) {
		this.attention = attention;
	}
	@Column(updatable=false)
	public Date getMakeTime() {
		return makeTime;
	}
	public void setMakeTime(Date makeTime) {
		this.makeTime = makeTime;
	}
	public Date getModifyTime() {
		return modifyTime;
	}
	public void setModifyTime(Date modifyTime) {
		this.modifyTime = modifyTime;
	}
	
	@Transient
	public String getMakeTimeDate8(){
		return CommUtil.getDate8FromDate(makeTime);
	}
	@Transient
	public String getMakeTimeDate17(){
		return CommUtil.getDate17FromDate(makeTime);
	}
	@Transient
	public String getModifyTimeDate8(){
		return CommUtil.getDate8FromDate(modifyTime);
	}
	@Transient
	public String getAuditDate(){
		return CommUtil.getDate8FromDate(auditTime);
	}
	public long getDeliverUserId() {
		return deliverUserId;
	}
	public void setDeliverUserId(long deliverUserId) {
		this.deliverUserId = deliverUserId;
	}
	public Date getDeliverTime() {
		return deliverTime;
	}
	public void setDeliverTime(Date deliverTime) {
		this.deliverTime = deliverTime;
	}
	public long getReceiveUserId() {
		return receiveUserId;
	}
	public void setReceiveUserId(long receiveUserId) {
		this.receiveUserId = receiveUserId;
	}
	public Date getReceiveTime() {
		return receiveTime;
	}
	public void setReceiveTime(Date receiveTime) {
		this.receiveTime = receiveTime;
	}
	public long getAuditUserId() {
		return auditUserId;
	}
	public void setAuditUserId(long auditUserId) {
		this.auditUserId = auditUserId;
	}
	@Column(length=255)
	public String getAuditUserName() {
		return auditUserName;
	}
	public void setAuditUserName(String auditUserName) {
		this.auditUserName = auditUserName;
	}
	public Date getAuditTime() {
		return auditTime;
	}
	public void setAuditTime(Date auditTime) {
		this.auditTime = auditTime;
	}
	public long getCreateUserId() {
		return createUserId;
	}
	public void setCreateUserId(long createUserId) {
		this.createUserId = createUserId;
	}
	@Column(length=255)
	public String getCreateUserName() {
		return createUserName;
	}
	public void setCreateUserName(String createUserName) {
		this.createUserName = createUserName;
	}
	
	
}
